﻿#ifndef PTGRAPHICDEVICE_H
#define PTGRAPHICDEVICE_H

#include "../../PTCommon.h"
#include "../PTGraphicCommon.h"

#include "../../System/PTMemorySystem.h"
#include "../../Window/PTWindow.h"

struct IPTGraphicDevice;
struct IPTGraphicResource;
struct IPTGraphicTexture2DArray;

enum class PTMemoryArchitecture :uint32_t
{
	UNKNOWN,
	NUMA_NCC,
	NUMA_CC,
	UMA_NCC,
	UMA_CC
};

struct IPTGraphicDevice
{
	virtual void Destory(IPTHeap *pHeap) = 0;

	//Memory Management Strategies
	//http://msdn.microsoft.com/en-us/library/mt613239
	virtual void MemoryInitialize(
		//Critical //Scaled/Optional //Streaming
		uint64_t SizeMaxAssetSRV,
		uint64_t SizeMaxAssetVBVIBV,
		//Re-used 
		uint64_t SizeMaxFrameRTVDSVSRV,
		uint64_t SizeMaxFrameUAVSRV,
		uint64_t SizeMaxFrameCBV,
		//Streaming 
		uint64_t SizeMaxStreamCPSC
	) = 0;

	//virtual void Present(IPTGraphicTexture2DArray *pTexture2D, IPTWindowOutput *pWindowOutput) = 0;
};

struct IPTGraphicConstantBufferView
{

};

struct IPTGraphicShaderResourceView
{

};

struct IPTGraphicUnorderedAccessView
{

};

extern "C" PTGRAPHICAPI IPTGraphicDevice * PTCALL PTGraphicDevice_Create(IPTHeap *pHeap);

#endif